package gui.jmenubar.jmenu;

import gui.jtab.receptaculo.JTabObjectReceptaculo;

import java.awt.event.MouseEvent;

import javax.swing.JMenuItem;
import javax.swing.JSeparator;

public class JMenuReceptaculo extends JMenuApp{

	private static final long serialVersionUID = 1L;
	
	public JMenuReceptaculo(){
		initComponents();
	}

	private void initComponents() {
		setText("Receptaculo");		
		
		JMenuItem jMenuItem = new JMenuItem();
		jMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
				java.awt.event.KeyEvent.VK_P,
				java.awt.event.InputEvent.CTRL_MASK));
		jMenuItem.setText("Perfila");
		jMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
			public void mousePressed(java.awt.event.MouseEvent evt) {
				jMenuItemPerfilaMouseClicked(evt);
			}

			private void jMenuItemPerfilaMouseClicked(MouseEvent evt) {
				((JTabObjectReceptaculo)jTab).perfila();
			}
		});
		add(jMenuItem);

		add(new JSeparator());

		jMenuItem = new JMenuItem();
		jMenuItem.setText("Color");
		jMenuItem
				.addMouseListener(new java.awt.event.MouseAdapter() {
					public void mousePressed(java.awt.event.MouseEvent evt) {
						jMenuItemColorMouseClicked(evt);
					}

					private void jMenuItemColorMouseClicked(MouseEvent evt) {
						((JTabObjectReceptaculo)jTab).setColor();						
					}
				});		
		add(jMenuItem);
	}	

}
